// 引入拦截器
import service from "@/utils/service.js";

let link = (url, method = "get", params, data) => {
    return new Promise((resolve, reject) => {
      service.request({
            url,
            method,
            params, //get发送数据的方式
            data //post发送数据
         }).then((ok) => {
            resolve(ok)
        }).catch((err) => {
            reject(err)
         })
     })

}

export default link